import requests

# 发送请求获取网页内容
url = 'https://www.baidu.com'
response = requests.get(url)

# 打印网页内容
print(response.text)

"""
requests.get(url) 用于向指定网址发送请求并获取网页内容.
response.text 返回网页的HTML代码.
"""